using System;
using System.Collections.Generic;
using System.Text;

namespace Adoor.Mapping.Attributes
{
    [Serializable, AttributeUsage(AttributeTargets.All)]
    public abstract class BaseAttribute : Attribute, IComparable
    {
        // Methods
        protected BaseAttribute(int position)
        {
            this._position = position;
        }

 
        
        public int CompareTo(object obj)
        {
            if (!(obj is BaseAttribute))
            {
                throw new ArgumentException("object is not a BaseAttribute");
            }
            return this.Position.CompareTo((obj as BaseAttribute).Position);
        }

 

        // Properties
        public int Position
        {
            get
            {
                return this._position;
            }
        }

        public abstract void AcceptVisitor(IVisitor visitor, System.Reflection.MemberInfo member);

        // Fields
        private int _position;
    }
 

}
